﻿using System;
using System.Collections.Generic;
using System.Data;

namespace AliCMS.UserModule.Dal
{
    public interface IUser : IDalBase
    {
		bool IsNameExist(string name);
		bool IsMobileExist(string mobile);
		bool IsWxUnionIDExist(string wxUnionId);
		bool IsWxppOpenIDExist(string wxppOpenId);
		bool IsWxmpOpenIDExist(string wxmpOpenId);

		DataTable GetByWxUnionID(string wxUnionId);
		DataTable GetByWxppOpenID(string wxppOpenId);
		DataTable GetByMobile(string mobile);
		
		Dictionary<string, object> Login(string name, string password);
	}
    namespace User
    {
        public interface IMoney : IDalBase
        {
            decimal GetBalance(Guid userId);
            decimal GetAllBalance(Guid userId);
            decimal GetDrawableBalance(Guid userId);

            decimal GetIncome(Guid userId, int days);

            #region 用户统计
            string User_StatSumOne(Guid userId, Dictionary<string, object> data);
            string User_StatSumAll(Dictionary<string, object> data);
            string User_StatSumHourly(Guid userId, Dictionary<string, object> data);
            string User_StatSumDaily(Guid userId, Dictionary<string, object> data);
            string User_StatSumMonthly(Guid userId, Dictionary<string, object> data);
            #endregion
        }
    }
}
